<?php
/**
 * Created by PhpStorm.
 * User: user1
 * Date: 2018/5/21
 * Time: 16:28
 */

namespace app\admin\controller;
use app\api\model\Comment as CommentModel;


class Comment extends Common
{
    /**
     * 评论列表
     * @return \think\response\Json|\think\response\View
     */
    public function index() {
        if (request()->isAjax()) {
            $data = CommentModel::getList()->toArray();
            return admin_return_data('评论列表', $data['total'], $data['data']);
        }
        return view();
    }
}